﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _038.匿名方法
{
	internal class Program
	{
		static void Main(string[] args)
		{
			Func<int, int, int> func = delegate (int x, int y) { return x + y; };

			Console.WriteLine(func(1, 2));
			// lambda
			//Func<int, int, int> fun = (x, y) => { return x + y; };
			Func<int, int, int> fun = (x, y) => x + y;

			Console.WriteLine(fun(1, 2));
		}
	}
}
